#ifndef __SCENEOBJECTHELPEROBJECT_H__
#define __SCENEOBJECTHELPEROBJECT_H__

#include <bigimage/renderitem.h>
#include <bigimage/geometry.h>
#include "helperobject.h"

class CSceneObject;
class CTerrainObject;
class CSceneObjectHelperGeometry : public CGeometry{
public:
    CSceneObjectHelperGeometry( CTerrainObject* pTerrainObject );
    virtual ~CSceneObjectHelperGeometry();
    virtual CVertexBuffer* GetRenderBuffer();
    virtual CIndexBuffer* GetIndexBuffer();
    virtual void UpdateGeometry( list< CSceneObject* >* vpSceneObjectList );

private:
    CTerrainObject* m_pTerrainObject;
    Ref < CVertexBuffer*> m_rRenderBuffer;
    Ref< CIndexBuffer* >m_rIndexBuffer;
};


class CSceneObjectHelperObject: public CHelperObject{
public:
    CSceneObjectHelperObject();
    virtual ~CSceneObjectHelperObject();
    void Init( CTerrainObject* pTerrainObject );
    void UpdateGeometry( list< CSceneObject* > *vpSceneObjectList );
    virtual int32 GetRenderElementHandles( CRenderElement** vRenderElementHandle, int32 nMaxCount );

private:
    CTerrainObject* m_pTerrainObject;
    list< CSceneObject* > m_vSceneObjectList;
    Ref< CRenderItem* >m_rRenderItem;
    Ref< CSceneObjectHelperGeometry* >m_rSceneObjectHelperGeometry;

};



#endif
